package com.bw.day_2.register

import androidx.lifecycle.MutableLiveData
import com.bw.base.entity.RegisterEntity
import com.bw.base.entity.UserEntity
import com.bw.base.mvvm.BaseViewModel
import com.bw.base.net.ApiService
import dagger.hilt.android.lifecycle.HiltViewModel
import javax.inject.Inject

@HiltViewModel
class RegisterViewModel @Inject constructor(val apiService: ApiService): BaseViewModel() {
    var registerSuccess = MutableLiveData<RegisterEntity>()
    fun register(name:String,pwd:String){
        httpRequest({ apiService.register(name, pwd) },{registerSuccess.value = it})
    }

}